import request from "@/request/";

// 获取列表
export const getList = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/page",
    method: "POST",
    data,
  });
};

// 查看详情
export const getDetail = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/bill-biz/detail",
    method: "POST",
    data,
  });
};

// 查看详情明细
export const getDetailTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/bill-detail/detail",
    method: "POST",
    data,
  });
};

// 新增-根据选择工单请求列表数据
export const getAddWorkOrderTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/order-inv-trans/page",
    method: "POST",
    data,
  });
};

// 导出
export const exportData = (data) => {
  return request({
    url: `/api/mes-warehouse-service/purc-order/export`,
    method: "POST",
    responseType: "blob",
    timeout: 300000,
    data: data,
  });
};

//新增
export const save = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/save",
    method: "POST",
    data,
  });
};
//删除
export const remove = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/delete",
    method: "POST",
    data,
  });
};

//打印
export const getPrintData = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/print",
    method: "POST",
    data,
  });
};

export const getEnum = (keyList) => {
  return request({
    url: "/api/mes-warehouse-service/preset/enum/list",
    method: "POST",
    data: {
      keyList,
    },
  });
};
